package models

import (
	"fmt"
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	UserName string
	RoleName string
	Roles    []*Role `gorm:"many2many:user_roles;"`
}

//func (this *User) TableName() string {
//	return "users"
//}
func (this *User) String() string {
	return fmt.Sprintf("%s-%s", this.UserName, this.RoleName)
}
